package com.chint.springboot.controller;

import com.chint.springboot.dao.CustomerDao;
import com.chint.springboot.model.pojo.Customer;
import com.chint.springboot.utils.JwtUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequiredArgsConstructor
@RestController
@CrossOrigin
@RequestMapping("/customer")
public class CustomerController {
    private final CustomerDao customerDao;

    @GetMapping("/list")
    public List<Customer> login(){
        List<Customer> all = customerDao.findAll();
        return all;
    }

}
